Comparing Changes using Complete Compare
You can compare your model with database, script, or another local model to check for differences using the Complete Compare wizard. Based on the results, you can then resolve or merge differences. Thus, maintaining a consistent model and database.
This topic walks you through the steps to compare an Neo4j model with database.
To compare models with database, follow these steps:
-
Open your Neo4j model.
Ensure that you are in the Physical mode.
For example, the following image uses a Neo4j model with three labels and nodes with relationships.
-
Click Actions > Complete Compare.
By default, the Complete Compare wizard assigns the open model as the Left Model. Hence, the Right Model tab appears. -
Click Database/Script.
By default, the Allow Demand Loading option is selected. -
Click Load.
The New Model dialog box appears. This starts the reverse engineering process to pull a model from the database to compare. -
Ensure that the Database is set to Neo4j. Then, click Next.
The Reverse Engineering Wizard appears. -
Click Database. Then, click Next.
The Connection tab appears. Use this tab to connect to the database from which you want to reverse engineer the model. -
After connection is established, click Next.
The Databases tab appears. It displays a list of available databases. -
Under Available Databases, select the databases that you want to reverse engineer. Then, click
.
This moves the selected databases under Selected Databases. -
Click Next and on the Label tab, click
.
This selects all the available labels. -
Click Next and in the Option Set tab, keep the default configuration.
-
Click Next and in the Detail Options tab, keep the default configuration.
-
Click OK.
The reverse engineering process starts. Once the process is complete, the Right Model is set to the one that you reverse engineered. -
Click Next and in the Type Selection tab, select the appropriate options.
For example, the following image shows the default options.
-
Click Next and in the Left Object Selection tab, select the appropriate options.
For example, the following image shows the default options.
-
Click Next and in the Right Object Selection tab, select the appropriate options.
For example, the following image shows the default options.
-
Click Compare.
The comparison process runs, and the Resolve Differences dialog box appears. It displays the differences between your model and database.
For example, the following image shows that the Year node is available in your model but not in the database.
Select the Year node and click. This will move the Year node to the right model (from the database). Similarly, resolve other differences.
-
As differences were moved to the right model, click
.
This opens the forward engineering wizard. -
Click Option Selection and clear all the Drop check boxes.
-
Click Node Filter and select or verify the nodes to be included on the forward engineering script.
-
Click Preview to view and verify the alter script.
-
Click Generate and connect to your Neo4j database.
The forward engineering process starts. The script generates your physical database schema. You can access your database and verify the newly generated schema. -
Click OK. Then click Finish.
This closes the Resolve Differences dialog box and displays the Complete Compare wizard. -
Click Close.
Copyright © 2023 Quest Software, Inc. |